<ol class="form" <%= "id=#{subsection_id}" unless local_assigns[:subsection_id].nil? %> <%= 'style="display: none;"'.html_safe if columns.collapsed %>>
  <% visibles, hiddens = visibles_and_hiddens(active_scaffold_config.field_search, columns) %>
  <% visibles.each do |column| -%>
    <% if column.respond_to? :each_column %>
      <li class="sub-section <%= column.css_class unless column.css_class.is_a?(Proc) %>">
        <%= render_subsection column, @record, nil, :field_search, partial: 'field_search_columns' %>
      </li>
    <% else %>
      <li class="form-element <%= column.css_class unless column.css_class.is_a?(Proc) %>"><%= search_attribute(column, @record) %></li>
    <% end %>
  <% end -%>
  <% unless hiddens.empty?  -%>
    <li class="sub-section">
    <% further_options_id = sub_section_id(sub_section: 'further_options') %>
    <h5>
      <%= as_(:optional_attributes) %>
      <%= link_to_visibility_toggle(further_options_id, default_visible: false) %>
    </h5>
    <ol id="<%= further_options_id %>" class="form" style="display:none;">
    <% hiddens.each do |column| -%>
      <% if column.respond_to? :each_column %>
        <li class="sub-section <%= column.css_class unless column.css_class.is_a?(Proc) %>">
          <%= render_subsection column, @record, nil, :field_search, partial: 'field_search_columns' %>
        </li>
      <% else %>
        <li class="form-element <%= column.css_class unless column.css_class.is_a?(Proc) %>"><%= search_attribute(column, @record) %></li>
      <% end %>
    <% end -%>
    </ol>
    </li>
  <% end -%>
</ol>
